#ifndef REQUESTDIALOG_H
#define REQUESTDIALOG_H

#include <QDialog>

namespace Ui {
class RequestDialog;
}

class QVBoxLayout;
class McForm;

class RequestDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit RequestDialog(QWidget *parent = 0);
    ~RequestDialog();

    void accept();
    void reject();

    void setRequest(const int req_id);
    bool insertRecord();
    bool updateRecord(const int req_id);

public slots:
    void addMc(McForm* form = 0);
    void removeMc();
    void on_add_toolButton_clicked() { addMc(); }
    void on_remove_toolButton_clicked() { removeMc(); }
    
private slots:
    void on_store_comboBox_currentIndexChanged(int );
    void checkLine();

private:
    void buttonsSetup();
    void loadData();

    void saveSettings();
    void readSettings();

    Ui::RequestDialog *ui;

    QVBoxLayout *layout;
};

#endif // REQUESTDIALOG_H
